import 'package:wanxiang_app/generated/json/base/json_convert_content.dart';
import 'package:wanxiang_app/bean/normal_entity.dart';

NormalEntity $NormalEntityFromJson(Map<String, dynamic> json) {
  final NormalEntity normalEntity = NormalEntity();
  final int? code = jsonConvert.convert<int>(json['code']);
  if (code != null) {
    normalEntity.code = code;
  }
  final String? msg = jsonConvert.convert<String>(json['msg']);
  if (msg != null) {
    normalEntity.msg = msg;
  }
  final int? data = jsonConvert.convert<int>(json['data']);
  if (data != null) {
    normalEntity.data = data;
  }
  return normalEntity;
}

Map<String, dynamic> $NormalEntityToJson(NormalEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['code'] = entity.code;
  data['msg'] = entity.msg;
  data['data'] = entity.data;
  return data;
}

extension NormalEntityExtension on NormalEntity {
  NormalEntity copyWith({
    int? code,
    String? msg,
    int? data,
  }) {
    return NormalEntity()
      ..code = code ?? this.code
      ..msg = msg ?? this.msg
      ..data = data ?? this.data;
  }
}